{extend name="admin@public/layout" /}
{block name="content"}
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="{:url('category/index')}" title="返回列表"><i class="icon iconfont icon-fanhui"></i></a>
      <div class="subject">
        <h3>栏目分类-新增</h3>
        <h5>所有前台栏目索引及管理</h5>
      </div>
      <ul class="tab-base nc-row">
        <li><a href="JavaScript:void(0);" nctype="index" class="current">基本属性</a></li>
        <li><a href="JavaScript:void(0);" nctype="group">生成HTML设置</a></li>
        <li><a href="JavaScript:void(0);" nctype="template">模板设置</a></li>
        <li><a href="JavaScript:void(0);" nctype="seo">SEO设置</a></li>
        <li><a href="JavaScript:void(0);" nctype="article">权限设置</a></li>
      </ul>
    </div>
  </div>
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="icon iconfont icon-dengpao"></i>
      <h4 alt="提示相关设置操作时应注意的要点" class="itip">操作提示</h4>
      <span id="explanationZoom" alt="收起提示" class="itip"></span>
    </div>
    <ul>
    </ul>
  </div>
  <form name="adminForm" id="add_form" action="{:url('category/add')}" method="post">
  <div class="ncap-form-default">
  <div nctype="index" class="none">
      <dl class="row">
        <dt class="tit">
          <label for="modelid">请选择模型</label>
        </dt>
        <dd class="opt">
          <select name="info[modelid]" id="modelid" class="valid">
            <option value="" {if condition="empty($parentid_modelid)"} selected{/if}>请选择模型</option>
            {volist name="models" id="vo"}
                <option value="{$vo.modelid}" {if condition="$parentid_modelid eq $vo['modelid']"} selected{/if}>{$vo.name}</option>
            {/volist}
          </select>
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="parentid">上级栏目</label>
        </dt>
        <dd class="opt">
          <select name="info[parentid]" id="parentid" class="valid">
            <option value="0" >≡ 作为一级栏目 ≡</option>
            {$category}
          </select>
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="catname">栏目名称</label>
        </dt>
        <dd class="opt">
          <input type="text" class="input-txt" name="info[catname]" id="catname" />
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="catdir">英文目录</label>
        </dt>
        <dd class="opt">
          <input type="text" class="input-txt" name="info[catdir]" id="catdir" />
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="catdir">栏目缩略图</label>
        </dt>
        <dd class="opt">
          <div class="input-file-show">
          {php} echo \util\Form::images('info[image]', 'image','', 'content'); {/php}
          </div>
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="description">栏目简介</label>
        </dt>
        <dd class="opt">
          <textarea name="info[description]" rows="6" class="tarea" ></textarea>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">是否在导航显示</dt>
        <dd class="opt">
          <div class="onoff">
            <label for="status1" class="cb-enable selected">是</label>
            <label for="status0" class="cb-disable">否</label>
            <input id="status1" name='info[ismenu]' value="1" type="radio">
            <input id="status0" name='info[ismenu]' value="0" type="radio">
          </div>
          <p class="notic">默认为显示，隐藏请点击【否】</p>
        </dd>
      </dl>
  </div>
  <!--模板-->
  <div nctype="template" class="none">
      <dl class="row">
        <dt class="tit">
          <label for="modelid">栏目首页模板</label>
        </dt>
        <dd class="opt">
          <select name="setting[category_template]">
            <option value="category.{:config('template.view_suffix')}" selected>默认栏目首页:category.{:config('template.view_suffix')}</option>
            {volist name="tp_category" id="vo"}
                <option value="{$vo}">{$vo}</option>
            {/volist}
          </select>
          <p class="notic">新增模板以category_xx.{:config('template.view_suffix')}形式</p>
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="modelid">栏目列表页模板</label>
        </dt>
        <dd class="opt">
          <select name="setting[list_template]">
            <option value="list.{:config('template.view_suffix')}" selected>默认栏目列表页:list.{:config('template.view_suffix')}</option>
            {volist name="tp_list" id="vo"}
                <option value="{$vo}">{$vo}</option>
            {/volist}
          </select>
          <p class="notic">新增模板以list_xx.{:config('template.view_suffix')}形式</p>
          <span class="err"></span>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label for="modelid">内容页模板</label>
        </dt>
        <dd class="opt">
          <select name="setting[show_template]">
            <option value="show.{:config('template.view_suffix')}" selected>默认内容页:show.{:config('template.view_suffix')}</option>
            {volist name="tp_show" id="vo"}
                <option value="{$vo}">{$vo}</option>
            {/volist}
          </select>
          <p class="notic">新增模板以show_xx.{:config('template.view_suffix')}形式</p>
          <span class="err"></span>
        </dd>
      </dl>
  </div>
  <!--seo-->
  <div nctype="seo" class="none">
    <dl class="row">
        <dt class="tit">
          <label>META Title</label>
        </dt>
        <dd class="opt">
          <input name="setting[meta_title]" type="text" value="" maxlength="40"  class="input-txt">
          <p class="notic">针对搜索引擎设置的标题  </p>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label>META Keywords</label>
        </dt>
        <dd class="opt">
          <textarea name="setting[meta_keywords]" rows="4" class="tarea"></textarea>
          <p class="notic">关键字中间用半角逗号隔开</p>
        </dd>
      </dl>
      <dl class="row">
        <dt class="tit">
          <label>META Description</label>
        </dt>
        <dd class="opt">
          <textarea name="setting[meta_description]" rows="4" class="tarea"></textarea>
          <p class="notic">针对搜索引擎设置的网页描述</p>
        </dd>
      </dl>
  </div>

  <input name="type" type="hidden" value="0">
  <div class="fix-bot"><a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="document.adminForm.submit()">确认提交</a></div>
  </div>
  </form>
</div>
<script type="text/javascript">
$(function(){
  $('.tab-base').find('a').bind('click',function(){
    $('.tab-base').find('a').removeClass('current');
    $(this).addClass('current');
    $('div.none').css('display','none');
    $('div[nctype="'+$(this).attr('nctype')+'"]').css('display','');
  });

  $('div.none').css('display','none');
  $('div[nctype="'+$(this).attr('nctype')+'"]').css('display','');
  $('.tab-base').find('a').eq(0).click();
});
</script>
<script type="text/javascript">
    var upurl ="{:url('attachment/attachments/WebUploader','','')}";
</script>
<script type="text/javascript" src="__STATIC__/admin/js/content_addtop.js"></script>
{/block}